<?php
namespace app\base\controller;

use app\model\Goods;
use app\model\Order;
use app\model\User;
use app\model\Storage;
use app\model\Supplier;
use app\model\Unit;
use app\model\Category;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        $this->assign('user', User::count());
        $this->assign('inorder', Order::where('status','=',2)->count());
        $this->assign('outorder', Order::where('status','=',3)->count());
        $this->assign('goods', Goods::count());
        $this->assign('storage', Storage::count());
        $this->assign('supplier', Supplier::count());
        $this->assign('unit', Unit::count());
        $this->assign('category', Category::count());
        return $this->fetch();
    }
}
